home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Assassins - Ultimate CD Games Collection 1
/
Assassins - Ultimate CD Games Collection (1994)(Weird Science)(Track 1 of 2)[!][Amiga-CD32-CDTV][CDD5332].iso
/
disks
/
asi093.dms
/
asi093.adf
/
DRIVINGGAME.AMOS
/
DRIVINGGAME.amosSourceCode
Wrap
AMOS Source Code
|
1992-05-20
|
10KB
|
496 lines
Screen Open 0,320,256,16,Lowres
Led Off
Hide
Curs Off
Flash Off
Dir$="df0:"
Volume 1,10
Volume 2,10
Load "misc/map.abk"
Load "misc/cars.abk"
Load "snds/samples.abk"
Open In 1,"levels/level1.map"
LF=Lof(1)
Close 1
Reserve As Work 6,LF+64
Open In 1,"levels/level1.map.val"
LF=Lof(1)
Close 1
Reserve As Work 8,LF+64
Extension_7_0084 16,16
Cls
C=2
M=1
O=11
Dim X(C)
Dim Y(C)
Dim XS(C)
Dim YS(C)
Dim D(C)
Dim DAM(C)
Dim RW(C)
Dim FW(C)
Dim T(C)
Dim HL(C)
Dim LAP(C)
Dim DEAD(C)
Dim TL(C)
Screen Open 3,320,256,8,Lowres
Curs Off
Flash Off
Paper 0
Cls
Track Load "music/mod.pumping classic",3
Load Iff "pics/mfpic"
For N=0 To 7 : Colour N,$0 : Next N
Fade 2,$0,$0,$0,$0,$0,$0,$F00,$900
Wait 50
Track Play 3
Fade 7,$0,$FFF,$BBB,$777,$555,$222,$FF0,$A70
Wait 90
Fade 7,$0,$FFF,$BBB,$777,$555,$222,$F0,$90
Wait 90
Fade 7,$0,$FFF,$BBB,$777,$555,$222,$F,$9
Wait 90
Fade 7,$0,$FFF,$BBB,$777,$555,$222,$F0F,$909
Wait 90
Fade 8
Wait 200
Screen Close 3
BGIN:
TL(1)=0 : TL(2)=0
L=1
CHEAT=0
NTRO
GAME:
Screen Open 0,320,256,16,Lowres
Curs Off
Flash Off
Get Icon Palette
Paper 3
Cls
Double Buffer
Autoback 0
LEVELLOAD[L]
For N=1 To C : DAM(N)=100 : Next N
Shared X(),Y(),XS(),YS(),D(),DAM(),C,M,O,RW(),FW(),T(),TV,L,HL(),LAP(),DEAD(),TT,W,KBANG,TL(),CHEAT
Get Icon Palette
Bob Off 35
Bob Off 36
Bob Off 37
Cls 0
Extension_7_0026 0,0 To 320,220
Extension_7_0006 0,0
Screen Swap
Cls 0
Extension_7_0006 0,0
Screen Swap
Screen Open 1,320,30,16,Lowres
Screen Display 1,140,267,320,30
Curs Off
Flash Off
Paper 3
Ink 1
Cls 3
Get Icon Palette
Screen 0
Bob Update Off
For N=1 To 37 : Bob Off N : Next N
Bob Update
NICEBOBS[L]
ROT[1]
ROT[2]
Bob Update
CDWN
For N=1 To C
DEAD(N)=0 : T(N)=0 : LAP(N)=0 : HL(N)=0
XS(N)=0 : YS(N)=0 : FW(N)=0 : RW(N)=0
Next N
O=11 : M=0
Repeat
EOG=0 : TT=0
W=0
For N=1 To C
PLYER[N]
TURNCHK[N]
MVE[N]
ROT[N]
TILECAR[N]
EDGE[N]
LIMIT[N]
SKID[N]
BANG[N]
BNCE[N]
CHKBNG[N]
DAMAGE[N]
PITS[N]
LAPCHK[N]
DEAD[N]
WINCHK[N]
SNDS[N]
If CHEAT=1 Then DAM(N)=100
Next N
GAMEOVER
Bob Update
Wait Vbl
If W>0 Then EOG=1
If TT=-2 Then EOG=1
Until EOG=1
If TT=-2 Then ND
If(L+1)=11 Then Goto CONGRAT
If W>0 Then L=L+1 : Goto GAME
Goto BGIN
End
Procedure ROT[CAR]
Bob 32-CAR,X(CAR),Y(CAR),D(CAR)+(16*(CAR-1))
End Proc
Procedure ACC[CAR]
If D(CAR)=1 Then XS(CAR)=(XS(CAR)/1.1) : YS(CAR)=YS(CAR)+2
If D(CAR)=2 Then XS(CAR)=XS(CAR)+1 : YS(CAR)=YS(CAR)+2
If D(CAR)=3 Then XS(CAR)=XS(CAR)+2 : YS(CAR)=YS(CAR)+2
If D(CAR)=4 Then XS(CAR)=XS(CAR)+2 : YS(CAR)=YS(CAR)+1
If D(CAR)=5 Then XS(CAR)=XS(CAR)+2 : YS(CAR)=(YS(CAR)/1.1)
If D(CAR)=6 Then XS(CAR)=XS(CAR)+2 : YS(CAR)=YS(CAR)-1
If D(CAR)=7 Then XS(CAR)=XS(CAR)+2 : YS(CAR)=YS(CAR)-2
If D(CAR)=8 Then XS(CAR)=XS(CAR)+1 : YS(CAR)=YS(CAR)-2
If D(CAR)=9 Then XS(CAR)=(XS(CAR)/1.1) : YS(CAR)=YS(CAR)-2
If D(CAR)=10 Then XS(CAR)=XS(CAR)-1 : YS(CAR)=YS(CAR)-2
If D(CAR)=11 Then XS(CAR)=XS(CAR)-2 : YS(CAR)=YS(CAR)-2
If D(CAR)=12 Then XS(CAR)=XS(CAR)-2 : YS(CAR)=YS(CAR)-1
If D(CAR)=13 Then XS(CAR)=XS(CAR)-2 : YS(CAR)=(YS(CAR)/1.1)
If D(CAR)=14 Then XS(CAR)=XS(CAR)-2 : YS(CAR)=YS(CAR)+1
If D(CAR)=15 Then XS(CAR)=XS(CAR)-2 : YS(CAR)=YS(CAR)+2
If D(CAR)=16 Then XS(CAR)=XS(CAR)-1 : YS(CAR)=YS(CAR)+2
End Proc
Procedure MVE[CAR]
X(CAR)=X(CAR)+(XS(CAR)/4)
Y(CAR)=Y(CAR)-(YS(CAR)/4)
End Proc
Procedure BRK[CAR]
XS(CAR)=XS(CAR)/1.1
YS(CAR)=YS(CAR)/1.1
End Proc
Procedure EDGE[CAR]
If X(CAR)<0 Then X(CAR)=0 : XS(CAR)=-(XS(CAR)/4) : DAM(CAR)=DAM(CAR)-1
If X(CAR)>310 Then X(CAR)=310 : XS(CAR)=-(XS(CAR)/4) : DAM(CAR)=DAM(CAR)-1
If Y(CAR)<0 Then Y(CAR)=0 : YS(CAR)=-(YS(CAR)/4) : DAM(CAR)=DAM(CAR)-1
If Y(CAR)>212 Then Y(CAR)=212 : YS(CAR)=-(YS(CAR)/4) : DAM(CAR)=DAM(CAR)-1
If TV=1 Then X(CAR)=X(CAR)-(XS(CAR)/4) : Y(CAR)=Y(CAR)+(YS(CAR)/4) : XS(CAR)=-XS(CAR)/200 : YS(CAR)=-YS(CAR)/200 : DAM(CAR)=DAM(CAR)-2
End Proc
Procedure LIMIT[CAR]
If XS(CAR)>20 Then XS(CAR)=20
If XS(CAR)<-20 Then XS(CAR)=-20
If YS(CAR)>20 Then YS(CAR)=20
If YS(CAR)<-20 Then YS(CAR)=-20
End Proc
Procedure BNCE[CAR]
If Bob Col(32-CAR)
For N=1 To C
If Col(32-N)
NX=(XS(CAR)/1.5)
NY=(YS(CAR)/1.5)
XS(CAR)=XS(CAR)-NX
YS(CAR)=YS(CAR)-NY
XS(N)=XS(N)+NX
YS(N)=YS(N)+NY
If CHEAT=0
DAM(CAR)=DAM(CAR)-1
End If
If DEAD(CAR)<>-1
Sam Play 4*CAR,1,14000
End If
End If
Next N
End If
End Proc
Procedure SKID[CAR]
If Bob Col(32-CAR)
For N=11 To O
If Col(N)
D(CAR)=D(CAR)+Int(Rnd(2)-1)
Sam Play 4*CAR,5,5000
End If
Next N
End If
End Proc
Procedure BANG[CAR]
If Bob Col(32-CAR)
For N=0 To M
If Col(N)
Bob Off N
T(CAR)=5
D(CAR)=Int(Rnd(2)-1)
If CHEAT=0
DAM(CAR)=DAM(CAR)-10
End If
Sam Play 4*CAR,1,6000
End If
Next N
End If
End Proc
Procedure CHKBNG[CAR]
If T(CAR)=1 Then Bob 32-CAR,X(CAR),Y(CAR),88 : T(CAR)=T(CAR)-1
If T(CAR)=2 Then Bob 32-CAR,X(CAR),Y(CAR),87 : T(CAR)=T(CAR)-1
If T(CAR)=3 Then Bob 32-CAR,X(CAR),Y(CAR),86 : T(CAR)=T(CAR)-1
If T(CAR)=4 Then Bob 32-CAR,X(CAR),Y(CAR),85 : T(CAR)=T(CAR)-1
If T(CAR)=5 Then Bob 32-CAR,X(CAR),Y(CAR),84 : T(CAR)=T(CAR)-1
End Proc
Procedure TILECAR[CAR]
TX=(X(CAR)+4)/16
TY=(Y(CAR)+5)/16
TV= Extension_7_0142(TX,TY,0)
End Proc
Procedure DAMAGE[CAR]
If DEAD(CAR)=0
Screen 1
BH=DAM(CAR)/5
Ink 3+(2*CAR)
If BH<19
Bar 8+(32*CAR),5 To 38+(32*CAR),24-BH
End If
Ink 2+(2*CAR)
If BH>1
Bar 8+(32*CAR),25-BH To 38+(32*CAR),25
End If
Screen 0
End If
End Proc
Procedure PITS[CAR]
If TV=2 Then DAM(CAR)=DAM(CAR)+1
If DAM(CAR)>100 Then DAM(CAR)=100
End Proc
Procedure LEVELLOAD[L]
LD$="levels/level"+Str$(L)-" "
Bload LD$+".map",Start(6)
Bload "LEVELS/LEVEL1.MAP.Val",Start(8)
End Proc
Procedure PLYER[CAR]
J=CAR-1
If Fire(J)=0 Then BRK[CAR]
If DEAD(CAR)<>0 Then Goto DEAD
If Jleft(J)=-1 Then D(CAR)=D(CAR)-1
If Jright(J)=-1 Then D(CAR)=D(CAR)+1
If Fire(J)=-1 Then ACC[CAR]
If Jdown(J)=-1 and RW(CAR)<5 Then Bob M,X(CAR)-(XS(CAR)/8),Y(CAR)-(YS(CAR)/8),81 : M=M+1 : RW(CAR)=RW(CAR)+1
If Jup(J)=-1 and FW(CAR)<5 Then Bob O,X(CAR)-(XS(CAR)/4),Y(CAR)-(YS(CAR)/4),82 : O=O+1 : FW(CAR)=FW(CAR)+1
DEAD:
End Proc
Procedure TURNCHK[CAR]
If D(CAR)<1 Then D(CAR)=16
If D(CAR)>16 Then D(CAR)=1
End Proc
Procedure LAPCHK[CAR]
Screen 1
If TV=4 Then HL(CAR)=1
Pen 2+(CAR*2)
Print At(16,CAR-1);"LAPS:";LAP(CAR);" TOTAL:";TL(CAR)
If(TV=3 and HL(CAR)=1) Then LAP(CAR)=LAP(CAR)+1 : HL(CAR)=0 : TL(CAR)=TL(CAR)+1
Screen 0
End Proc
Procedure NICEBOBS[TR]
If TR=1
Bob 39,191,91,93
Bob 38,191,6,94
Bob 37,105,114,91
Bob 36,95,20,90
Bob 35,265,145,89
Bob Update
X(1)=173 : Y(1)=3
X(2)=173 : Y(2)=17
D(1)=5 : D(2)=5
End If
If TR=2
Bob 39,96,202,93
Bob 38,207,6,94
Bob 37,230,120,90
Bob 36,140,40,90
Bob 35,265,165,89
Bob Update
X(1)=189 : Y(1)=3
X(2)=189 : Y(2)=17
D(1)=5 : D(2)=5
End If
If TR=3
Bob 39,112,202,93
Bob 38,191,6,94
Bob 36,240,70,90
Bob 35,30,85,89
Bob Update
X(1)=173 : Y(1)=3
X(2)=173 : Y(2)=17
D(1)=5 : D(2)=5
End If
If TR=4
Bob 39,113,171,93
Bob 38,223,6,94
Bob 37,53,151,90
Bob 36,87,21,90
Bob 35,290,114,89
Bob Update
X(1)=205 : Y(1)=3
X(2)=205 : Y(2)=17
D(1)=5 : D(2)=5
End If
If TR=5
Bob 39,146,171,93
Bob 38,95,116,94
Bob 37,25,15,89
Bob 36,135,95,89
Bob 35,255,135,89
Bob Update
X(1)=77 : Y(1)=115
X(2)=77 : Y(2)=129
D(1)=5 : D(2)=5
End If
If TR=6
Bob 39,79,6,94
Bob 38,255,6,94
X(1)=61 : Y(1)=3
X(2)=237 : Y(2)=3
D(1)=5 : D(2)=5
End If
If TR=7
Bob 39,156,201,93
Bob 38,214,6,94
Bob 37,35,4,91
Bob 35,270,140,89
Bob Update
X(1)=189 : Y(1)=3
X(2)=189 : Y(2)=17
D(1)=5 : D(2)=5
End If
If TR=8
Bob 39,144,90,93
Bob 38,191,6,94
Bob 37,100,174,92
Bob 36,100,126,92
Bob 35,130,16,89
Bob Update
X(1)=173 : Y(1)=3
X(2)=173 : Y(2)=17
D(1)=5 : D(2)=5
End If
If TR=9
Bob 39,160,200,93
Bob 38,175,22,94
Bob 35,265,165,89
Bob Update
X(1)=157 : Y(1)=33
X(2)=157 : Y(2)=19
D(1)=5 : D(2)=5
End If
If TR=10
Bob 39,193,200,93
Bob 38,223,133,94
Bob 37,90,190,92
Bob 36,32,85,90
Bob 35,265,165,89
Bob Update
X(1)=205 : Y(1)=131
X(2)=205 : Y(2)=145
D(1)=5 : D(2)=5
End If
End Proc
Procedure DEAD[CAR]
If(DAM(CAR)<0 and DEAD(CAR)<>-1) Then DEAD(CAR)=1
End Proc
Procedure GAMEOVER
TT=0
For N=1 To C : TT=TT+DEAD(N) : Next N
End Proc
Procedure NTRO
Screen Open 3,320,256,32,Lowres
Curs Off
Flash Off
Colour 0,$0
Paper 0
Cls
Wait Vbl
Load Iff "pics/title.pic"
Screen Swap
Track Load "music/mod.titles",3
Track Play 3
Repeat
A$=Inkey$
If A$="c" Then CHEAT=1 : Bell
Until Fire(1)<>0
Track Stop
Erase 3
Screen Close 3
End Proc
Procedure ND
Cls
Screen Swap
Cls
Screen Swap
Screen 0
Screen To Front
Screen Open 3,320,256,32,Lowres
Curs Off
Flash Off
Paper 0
Colour 0,$0
Cls 0
Wait Vbl
Load Iff "pics/dead.pic"
Screen Swap
Wait Vbl
Track Load "music/mod.dead",3
Track Play 3
Paper 0
Pen 18
Print At(10,18);" RED CAR SCORED:";TL(1)
Print At(10,19);"YELLOW CAR SCORED:";TL(2)
Repeat
Until Fire(1)<>0
Track Stop
Erase 3
Screen Close 3
Screen Close 1
Screen Close 0
End Proc
Procedure WINCHK[CAR]
If LAP(CAR)>3 Then W=CAR
End Proc
Procedure SNDS[CAR]
Rem engine
SP=Abs(XS(CAR))+Abs(YS(CAR))
If DEAD(CAR)=0 Then Sam Play 3-CAR,3,16000+(900*SP)
Rem skid
If(Jleft(CAR-1)=-1 and SP>20 or Jright(CAR-1)=-1 and SP>20) Then Sam Play 4*CAR,5,5000
Rem deadcrash
If DEAD(CAR)=1 Then DEAD(CAR)=-1 : Sam Play 4*CAR,2,5000
End Proc
Procedure CDWN
For N=1 To 4 : Sam Play 15,4,7000 : Wait 40 : Next N
End Proc
CONGRAT:
Screen Open 3,320,256,32,Lowres
Curs Off
Flash Off
Colour 0,$0
Cls 0
Wait Vbl
Load Iff "pics/congrat.pic"
Screen Swap
Wait Vbl
Track Load "music/mod.congrat",3
Track Play 3
Paper 17
Pen 0
Print At(10,8);" RED CAR SCORED:";TL(1)
Print At(10,9);"YELLOW CAR SCORED:";TL(2)
Repeat
Until Joy(1)<>0
Track Stop
Erase 3
Screen Close 3
Screen Close 1
Screen Close 0
Goto BGIN